home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / bipl.zip / PROGS.ZIP / LONGEST.ICN < prev    next >
Text File  |  1992-09-28  |  695b  |  26 lines

  1. ############################################################################
  2. #
  3. #    File:     longest.icn
  4. #
  5. #    Subject:  Program to write length of longest line in a file
  6. #
  7. #    Author:   Ralph E. Griswold
  8. #
  9. #    Date:     February 22, 1992
  10. #
  11. ###########################################################################
  12. #
  13. #  This little programs just writes the length of the longest line in
  14. #  standard input.  Hardly worth the trouble, but it's been handy.
  15. #
  16. ############################################################################
  17.  
  18. procedure main()
  19.    local line, max, save
  20.  
  21.    max := 0
  22.    while line := read() do
  23.       if max <:= *line then save := line
  24.    write(save)
  25. end
  26.